package com.bai.dto;

import com.bai.Pojo.SysFile;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;
@Data
public class Children {
    private int id;
    private String title;
    private boolean last;
    private String href;
    private int parentId;
    List<Children> children;
    public Children(SysFile file){
        this.id= (int) file.getId();
        this.title=file.getName();
        this.href=file.getPath();
        if(file.getIsFolder()==1){
            this.last=false;
            this.children=new ArrayList<>();
        }else {
            this.last=true;
        }

        this.parentId= (int) file.getParentId();
    }
}
